// RegexpHandler.h Added by Sulan 2005-05-20
// Pothead had a little play with it

#if !defined(AFX_REGEXP_HANDLER_H__E9B493AC_97A7_4A18_AF7C_06BFE1926A52__INCLUDED_)
#define AFX_REGEXP_HANDLER_H__E9B493AC_97A7_4A18_AF7C_06BFE1926A52__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class RegexpHandler 
{
public:
	static bool isValid(const string& aExp, const bool& caseSensitive = true);
	static bool isIp(const string& aString);
	//Gabberworld
	static bool isMatch(const string& aString, const string& aExp);
	//end
	static string matchExp(const string& aExp, const string& aString, const bool& caseSensitive = true);
	static bool matchProfile(const string& aString, const string& aExp, const bool& caseSensitive = true, const bool& alreadyCheckedValidity = false);
	static string formatRegExp(const string& msg, StringMap& params);
	static string getVersion(const string& aExp, const string& aTag);

private:
	static string splitVersion(const string& aExp, const string& aTag, const bool firstPart);

	static bool processRegExp(const bool forValid, const string& aExp, const string& aString);
	static string processRegExp(const string& aExp, const string& aString, const bool firstPart);
};
#endif // !defined(AFX_REGEXP_HANDLER_H__E9B493AC_97A7_4A18_AF7C_06BFE1926A52__INCLUDED_)
/**
 * @file
 * $Id: RegexpHandler.h 276 2005-08-03 23:09:24Z Pothead $
 */